package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.GoodsService;
import com.atguigu.jxc.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author ：Shine
 * @description：
 * @date ：2021/3/23 9:19
 */
@RestController
@RequestMapping("/unit/")
public class GoodsUnitController {

    @Autowired
    private UnitService unitService;

//    http://localhost:8080/unit/list
    @PostMapping("list")
    public Map<String,Object> unitList(){
        return unitService.getUnitList();
    }
}
